/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package serveur;
import java.io.*;
import java.net.*;
public class Accepter_connexion implements Runnable{
    
    private ServerSocket socketserver = null;
    private Socket socket = null;
    
    public Thread t1;
    public Accepter_connexion(ServerSocket ss){
        socketserver = ss;
    }

    public void run() {
        
        try{
            while(true){
                
                socket = socketserver.accept();
                System.out.println("Un client veut se connecter ");
                
                t1 = new Thread(new Authentification(socket));
                t1.start();
            }
            } catch (IOException e) {
                   System.out.println("Erreur serveur");
            }
        }
        
    }
   
